<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="/system/layui/css/layui.css" media="all">
</head>
<body>
    <br>
  <form class="layui-form" style="width:80%;">
      <button type="submit" onclick="sub()" class="layui-btn layui-btn-warm" style="margin-left:160px;position:absolute;top:460px;">添加</button>
      <div class="layui-form-item layui-row layui-col-xs12 layui-form">
          <label class="layui-form-label" style="background-color: #009688;color: #F8F8F8;width: 60px;">用户名称</label>
          <div class="layui-input-block">
              <select class="user">
                  <option th:each="user:${list}" th:value="${user.id}" th:text="${user.login_name}"></option>
              </select>
          </div>
      </div>
      <div class="layui-form-item layui-row layui-col-xs12">
          <label class="layui-form-label" style="background-color: #009688;color: #F8F8F8;width: 60px;">员工姓名</label>
          <div class="layui-input-block">
              <input type="text" class="layui-input name" placeholder="请输入名称">
          </div>
      </div>
      <div class="layui-form-item layui-row layui-col-xs12">
          <label class="layui-form-label" style="background-color: #009688;color: #F8F8F8;width: 60px;">员工年龄</label>
          <div class="layui-input-block">
              <input type="text" class="layui-input age" placeholder="请输入年龄">
          </div>
      </div>
      <div class="layui-form-item layui-row layui-col-xs12">
          <label class="layui-form-label" style="background-color: #009688;color: #F8F8F8;width: 60px;">工作年限</label>
          <div class="layui-input-block">
              <input type="text" class="layui-input workYear" placeholder="请输入工作年限">
          </div>
      </div>
      <div class="layui-form-item layui-row layui-col-xs12">
          <label class="layui-form-label" style="background-color: #009688;color: #F8F8F8;width: 60px;">员工能力</label>
          <div class="layui-input-block">
              <input type="text" class="layui-input ability" placeholder="请输入员工能力">
          </div>
      </div>
      <div class="layui-form-item layui-row layui-col-xs12 layui-form">
          <label class="layui-form-label" style="background-color: #009688;color: #F8F8F8;width: 60px;">岗位</label>
          <div class="layui-input-block">
              <select class="post">
                  <option th:each="post:${list2}" th:value="${post.id}" th:text="${post.name}"></option>
              </select>
          </div>
      </div>
      <div class="layui-form-item layui-row layui-col-xs12">
          <label class="layui-form-label" style="background-color: #009688;color: #F8F8F8;width: 60px;">评分</label>
          <div class="layui-input-block">
              <input type="text" class="layui-input grade" placeholder="请输入员工分数">
          </div>
      </div>
  </form>
</body>
<script type="text/javascript" src="/system/layui/layui.js"></script>
<script type="text/javascript" src="/system/js/jquery-3.3.1.js"></script>
<script type="text/javascript" src="/staff/add.js"></script>
<script>
    layui.use('form', function() { //此段代码必不可少
        var form = layui.form;
        form.render();
    });
</script>
</html>